home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfgetgroups.z / pxfgetgroups
Encoding:
Text File  |  1998-10-30  |  4.5 KB  |  97 lines

  1. PXFGETGROUPS(3F)                                       Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFGGEETTGGRROOUUPPSS - Gets supplementary group IDs
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSUUBBRROOUUTTIINNEE PPXXFFGGEETTGGRROOUUPPSS ((_i_g_i_d_s_e_t_s_i_z_e,, _i_g_r_o_u_p_l_i_s_t,, _n_g_r_o_u_p_s,, _i_e_r_r_o_r))
  9.      IINNTTEEGGEERR _i_g_i_d_s_e_t_s_i_z_e,, _i_g_r_o_u_p_l_i_s_t((_i_g_i_d_s_e_t_s_i_z_e)),, _n_g_r_o_u_p_s,, _i_e_r_r_o_r
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      7.2 F77 compiler.
  22.  
  23.      The PPXXFFGGEETTGGRROOUUPPSS subroutine uses the ggeettggrroouuppss(2) system call to fill
  24.      _i_g_r_o_u_p_l_i_s_t with a supplemental group list for the calling process.
  25.  
  26.      As a special case, when _i_g_i_d_s_e_t_s_i_z_e is zero, PPXXFFGGEETTGGRROOUUPPSS will return
  27.      the number of supplemental group IDs for the calling process in the
  28.      _n_g_r_o_u_p_s variable, leaving the _i_g_r_o_u_p_l_i_s_t variable unchanged.
  29.  
  30.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  31.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  32.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  33.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  34.      IRIX, the default kind is KKIINNDD==44.
  35.  
  36.      The following is a list of valid arguments for this routine:
  37.  
  38.      _i_g_i_d_s_e_t_s_i_z_e
  39.                 An input integer variable containing the size of the
  40.                 _i_g_r_o_u_p_l_i_s_t integer array.
  41.  
  42.      _i_g_r_o_u_p_l_i_s_t An output integer variable or array element that will
  43.                 contain a set of supplemental group IDs for the calling
  44.                 process. NNGGRROOUUPPSS__MMAAXX, found in <<ssyyss//ppaarraamm..hh>> for the UNICOS
  45.                 operating system and <<uunniissttdd..hh>> for IRIX systems, defines
  46.                 the maximum number of supplemental group IDs for a process.
  47.  
  48.      _n_g_r_o_u_p_s    An output integer variable that will contain the number of
  49.                 supplemental group IDs for the calling process.
  50.  
  51.      _i_e_r_r_o_r     An output integer variable that contains zero if the
  52.                 variable was changed or nonzero if PPXXFFGGEETTGGRROOUUPPSS was not
  53.                 successful.
  54.  
  55.      The PPXXFFGGEETTGGRROOUUPPSS routine may return the EEIINNVVAALL error value if
  56.      _i_g_i_d_s_e_t_s_i_z_e is not equal to zero and is less than the number of
  57.      supplementary group IDs.
  58.  
  59. EEXXAAMMPPLLEESS
  60.      This example finds the number of supplemental group IDs for its
  61.      process, prints out the number, and then retrieves the supplemental
  62.      group IDs and prints each group ID.
  63.  
  64.               program pxftest
  65.               integer igidgrouplist, igrouplist(64), ngroups, ierror, i
  66.  
  67.         c     find out the number of groups
  68.               igidgrouplist = 0
  69.               CALL PXFGETGROUPS(igidgrouplist, igrouplist, ngroups, ierror)
  70.               print *,'groups for process = ',ngroups,' error = ',ierror
  71.  
  72.         c     call pxfgetgroups
  73.               igidgrouplist = 64
  74.               CALL PXFGETGROUPS(igidgrouplist, igrouplist, ngroups, ierror)
  75.               print *,'groups for process = ',ngroups,' error = ',ierror
  76.  
  77.         c     print out all groups for the process
  78.               do i=1,ngroups
  79.                  print *,' gid = ', igrouplist(i)
  80.               enddo
  81.  
  82.               end
  83.  
  84.      This example may return the following results:
  85.  
  86.            groups for process =  2  error =  0
  87.            groups for process =  2  error =  0
  88.            gid =  1013
  89.            gid =  10533
  90.  
  91. SSEEEE AALLSSOO
  92.      ggeettggrroouuppss(2)
  93.  
  94.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  95.      2165, for the printed version of this man page.
  96.  
  97.